<template>
    <div v-if="tkIsShow">
        <div class="zhezhao"></div>
        <div class="tankuang">
            <div class="tk_title">{{ title }}</div>
            <img src="../../assets/icon-close.png" class="tk_close" @click="closeTk">
            <div class="tk_content">
                <video :src="videoUrl" controls="controls" :poster="videoCover" style="height: 90%;"></video>
              
            </div>
        </div>
    </div>
</template>
<script>
export default {
  data() {
    return {
        tkIsShow:false,
        title:"",
        videoCover:"",
        videoUrl:""
    };
  },
  methods: {
    __init(url,cover) { 
        this.videoCover=cover;
        this.videoUrl=url;
    },
    closeTk(){
        this.tkIsShow = false;
    }
  }
}
</script>
<style scoped lang="scss">
  .zhezhao{
    position: fixed;
    width: 100%;
    height: 100%;
    background-color: #000;
    opacity: 0.6;
    top: 0;
    left: 0;
    z-index: 200;
  }
  .tankuang{
    position: fixed;
    width: calc(100% - 240px);
    background-color: #fff;
    top: 50px;
    left: 220px;
    z-index: 201;
    border-radius: 5px;
    height: calc(100% - 70px);
  }
  .tk_title{
    font-size: 17px;
    height: 25px;
    line-height: 25px;
    margin: 15px 0;
  }
  .tk_content{
    width: 100%;
    height: calc(100% - 100px);
  }
  
  .tk_close{
    position: absolute;
    width: 16px;
    height: 16px;
    top: 18px;
    right: 20px;
  }
</style>
